#include<at89c51ed2.h>
#include <mcs51reg.h>

void serialComm(int mode){ //configures standard baud of 19200 irrespective of mode X1/X2
	if(mode==1){
		TH1=0xFD;		// Timer Value 253 
		TR1 = 1; // TR1: timer 1 run
		TI = 1;	//set TI flag for putchar sequence
		RI = 0;	}
	if(mode==2){
		TH1=0xFA;		// Timer Value 250
		TR1 = 1; 		// TR1: timer 1 run
		TI = 1;			//set TI flag for putchar sequence
		RI = 0;	}
		
}
